#include "Jeopardy.h"



void Jeopardy::createqanda()
{
	questions q1, q2, q3, q4;

	q1.question = "What sort of simulation are you doing at this very moment?";
	q1.correct = "D. Game-Based Model";
	q1.wrong1 = "A. Interactive Spread Sheet";
	q1.wrong2 = "B. Virtual Lab";
	q1.wrong3 = "C. Branching Story";
	q1.answer = 'D';


	q2.question = "Did you do your discussions this week?";
	q2.correct = "D. Yeah.";
	q2.wrong1 = "A. [Speech 10/20] (Lie) Yes, I did because they are helpful to my learning experiences. *Wink*";
	q2.wrong2 = "B. No?";
	q2.wrong3 = "C. There is no D.";
	q2.answer = 'D';

	q3.question = "How many pages was the essay supposed to be?";
	q3.correct = "H. 2 - 3";
	q3.wrong1 = "F. 5 - 7";
	q3.wrong2 = "G. 1";
	q3.wrong3 = "E. I don't know, I just wrote it and did stuff and turned it in...";
	q3.answer = 'H';
	
	q4.question = "Who made this part of the project?";
	q4.correct = "T. Tyler Lawton";
	q4.wrong1 = "B. Brandon";
	q4.wrong2 = "b. Brandon";
	q4.wrong3 = "Q. Strenalis";
	q4.answer ='T';
	
	quiz.push_back(q1);
	quiz.push_back(q2);
	quiz.push_back(q3);
	quiz.push_back(q4);
	
};
void Jeopardy::playgame()
{
	for each(questions pQuestion in quiz)
	{
		//cout << pQuestion.question << endl;
		//cout << "-------------------------------------" << endl;
		//cout << pQuestion.wrong1 << endl;
		//cout << pQuestion.wrong2 << endl;
		//cout << pQuestion.wrong3 << endl;
		//cout << pQuestion.correct << endl;
		//cout << endl;
		//cout << "Please enter your answer (Or Else!) : ";
		//cin >> answer;
		//cout << endl;
		//checkifpass(answer, pQuestion);
		//system("cls");
		//cout << "-------------------------------------" << endl;
	}
}
void Jeopardy::checkifpass(char Answer, questions question)
{
	if (Answer == question.answer)
	{
		addscore();
	}
	else
	{
		subscore();
	}
}
void Jeopardy::addscore()
{
	score += 100000;
}
void Jeopardy::subscore()
{
	score -= 50000;
}
bool Jeopardy::checkandprintresults()
{
	bool didwin;
	if (score >= 400000)
	{
		/*cout << "Congratulations! YOU WON!" << endl;*/
		didwin = true;
	}
	else
	{
		/*cout << "Dude... really? You be da dumb to not get all 4 of those correct." << endl;*/
		didwin = false;
	}
	/*cout << "Well let's see your score!" << endl;
	cout << "Overall you have won: $" << score << "!" << endl;
	cout << setprecision(2) << fixed << endl;
	cout << "In Yen of course!" << endl;
	cout << "You have received... $" << score/100000 << endl;*/
	moneywon = score/100000;
	return didwin;
	
}